import {service as request} from '@/utils/request'



export function getList(data) {
  return request({
    url: `/hawk/trigger/get/from/host/${data.page.current}/${data.page.size}`,
    method: 'get',
    params:data.query
  })
}




export function getDetail(id) {
  return request({
    url: `/hawk/trigger/get/${id}`,
    method: 'get'
  })
}

export function templateList() {
  return request({
    url: `/monitor/item/key`,
    method: 'get'
  })
}

export function searchList(data) {
  return request({
    url: `/monitor/config/item/${JSON.stringify(data)}`,
    method: 'get'
  })
}
export function doAdd(data) {
  return request({
    url: '/hawk/trigger/save',
    method: 'post',
    data
  })
}
export function getSellect(id) {
  return request({
    url: `/monitor/item/host/${id}`,
    method: 'get',
  })
}
export function doEdit(data) {
  return request({
    url: '/hawk/trigger/update',
    method: 'put',
    data:data
  })
}
export function doDelete(ids) {
  return request({
    url: `/hawk/trigger/del`,
    method: 'delete',
    data:ids
  })
}
export function syncTrigger(id) {
  return request({
    url: `/monitor/trigger/info/sync/${id}`,
    method: 'get'
  })
}
export function getOne(id) {
  return request({
    url: `/monitor/item/detail/${id}`,
    method: 'get'
  })
}
export function getAll() {
  return request({
    url: `/monitor/config/item`,
    method: 'get'
  })
}
export function separateItem(data){
  return request({
    url: '/monitor/config/item/separate',
    method: 'put',
    data
  })
}
